
import 'package:fluwx/fluwx.dart';
import 'package:yb_zsyiji_androidflutter_pro/YBHelper/YBImageStyle/YBImageStyle.dart';


class YBBaseWeChatUtils {

  //朋友圈-本地图片
  static void shareWeChatLocalTimeLine(String modelUrl,{String title,String descirptionStr,String thumbNailStr}){
    var  model = WeChatShareWebPageModel(
      modelUrl,
      title: title,
      description: descirptionStr,
      thumbnail: (thumbNailStr.contains("http//") || thumbNailStr.contains("https//")) == true?WeChatImage.network(thumbNailStr):WeChatImage.asset(YBImageStyle.getImagePath("zsyiji_APPicon",format:'jpg')),
      scene: WeChatScene.TIMELINE,
    );
    shareToWeChat(model);
  }


  //会话-本地图片
  static void shareWeChatLocalSession(String modelUrl,{String title,String descirptionStr,String thumbNailStr}){
    var  model = WeChatShareWebPageModel(
      modelUrl,
      title: title,
      description: descirptionStr,
      thumbnail: (thumbNailStr.contains("https://") || thumbNailStr.contains("http://")) == true?WeChatImage.network(thumbNailStr):WeChatImage.asset(YBImageStyle.getImagePath('zsyiji_APPicon',format: "jpg")),
      scene: WeChatScene.SESSION,
    );
    shareToWeChat(model);
  }

}